#include <iostream>
#include <cstdio>
#include <queue>
#include <cstdlib>
using namespace std;

int main() {
    queue<int>Q;
    int n, s, m;
    int he = -0X7fffffff;
    cin >> n >> s >> m;
    for(int i = s; i <= n; i++) Q.push(i);
    for(int i = 1; i < s; i++) Q.push(i);
    while(!Q.empty()) {
        for(int i = 0; i < m - 1; i++) {
            int q = Q.front();
            Q.pop();
            Q.push(q);
        }
        he = Q.front();
        cout << he << " ";
        Q.pop();
        if(Q.empty()) break;
    }
    cout << endl;
    return 0;
}
